describe('showMessage', function() {
    it('should alert the correct message', function(done) {
        // Override the alert function
        const originalAlert = window.alert;
        let alertMessage = '';

        window.alert = function(message) {
            alertMessage = message; // Capture the alert message
        };

        // Call the function to test
        showMessage();

        // Check if the alert message is as expected
        setTimeout(function() {
            try {
                chai.expect(alertMessage).to.equal("Hello, World! This is a simple JavaScript alert.");
                done(); // Indicate that the test is complete
            } catch (error) {
                done(error); // Indicate that the test failed
            } finally {
                // Restore the original alert function
                window.alert = originalAlert;
            }
        }, 0);
    });
});
